BTSC pilot signal lock

ABSTRACT

An integrated digital BTSC encoder with an improved pilot signal generator substantially implemented on a single CMOS integrated circuit is described. By digitally generating a sinusoid that is frequency locked to a two-state input reference signal using a high rate internal clock, a hardware-efficient BTSC pilot signal generator is provided with good acquisition and tracking performance. Implemented efficiently as a simple phase detector, a low-complexity loop filter, a pilot frequency offset adder, a phase accumulator and a sinusoidal generator, the invention enables lower-rate post-processing of the pilot tone without a costly variable interpolator decimator structures.

RELATED APPLICATIONS

This patent application claims priority from U.S. Provisional PatentApplication Ser. No. 60/495,025, entitled “BTSC Pilot Signal Lock” filedon Aug. 14, 2003.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention is directed in general to television modulators.In one aspect, the present invention relates to a method and system forgenerating a carrier tone for an audio signal that is synchronized to anassociated video signal in accordance with established standards for thebroadcast of stereophonic cable and television signals in the UnitedStates and in other countries. In a further aspect, the presentinvention provides an integrated circuit system for generating an auralpilot subcarrier for use in digital BTSC stereo encoding and decoding.

2. Related Art

In 1984, the Federal Communications Commission (FCC) adopted a standardfor the audio portion of television signals called MultichannelTelevision Sound (MTS) Transmission and Audio Processing Requirementsfor the BTSC System—OET-60, which permitted television programs to bebroadcast and received with bichannel audio, e.g., stereophonic sound.Similar to the definition of stereo for FM radio broadcast, MTS defineda system for enhanced, stereo audio for television broadcast andreception. Also known as BTSC stereo encoding (after the BroadcastTelevision System Committee (BTSC) that defined it), the BTSCtransmission methodology is built around the concept of companding,which means that certain aspects of the incoming signal are compressedduring the encoding process. A complementary expansion of the signal isthen applied during the decoding process.

The original monophonic television signals carried only a single channelof audio. Due to the configuration of the monophonic television signaland the need to maintain compatibility with existing television sets,the stereophonic information was necessarily located in a higherfrequency region of the BTSC signal, making the stereophonic channelmuch noisier than the monophonic audio channel. This resulted in aninherently higher noise floor for the stereo signal than for themonophonic signal. The BTSC standard overcame this problem by definingan encoding system that provided additional signal processing for thestereophonic audio signal. Prior to broadcast of a BTSC signal by atelevision station, the audio portion of a television program is encodedin the manner prescribed by the BTSC standard, and upon reception of aBTSC signal, a receiver (e.g., a television set) then decodes the audioportion in a complementary manner. This complementary encoding anddecoding ensures that the signal-to-noise ratio of the entire stereoaudio signal is maintained at acceptable levels. FIG. 1 is a blockdiagram of the front end portion of an analog BTSC encoding system 100,as defined by the BTSC standard. Encoder 100 receives left and rightchannel audio input signals (indicated in FIG. 1 as “L” and “R”,respectively) and generates a conditioned sum signal (“L+R”) and anencoded difference signal (“L−R”). It will be appreciated that theprocessing of the sum signal (“L+R”) and difference signal (“L−R”) bythe encoder 100 is substantially as described in the Background sectionof U.S. Pat. No. 5,796,842 which explains that the BTSC standardrigorously defines the desired operation of the encoding filters interms of idealized analog filters.

To create the stereo signal, the BTSC standard also defines a compositestereophonic baseband signal (referred to hereinafter as the “compositesignal”) that is used to generate the audio portion of a BTSC signal.The composite signal is generated using the conditioned sum signal(“L+R”), the encoded difference signal (“L−R”), and a tone signal,commonly referred to as the “pilot tone” or simply as the “pilot,” whichis a sine wave at a frequency Fp, where Fp is equal to 15,734 Hz.

FIG. 2 is a graph of the spectrum of the composite signal. In FIG. 2,the spectral band 202 containing the content of the conditioned sumsignal (or the “sum channel signal”) is indicated as “L+R.” The spectralsideband 204 containing the content of the frequency shifted encodeddifference signal (or the “difference channel signal”) is each indicatedas “L−R,” and the pilot tone 210 is indicated by the arrow at frequencyFp. In addition, the spectral sideband 206 containing the content of thefrequency shifted encoded secondary audio program (or the “secondaryaudio channel”) is each indicated as “SAP,” and the spectral sideband208 containing the content of the frequency shifted professional channelis each indicated as “Professional Channel.”

The encoded “L+R” and “L−R” signals are transmitted to the receiver,such as a stereo television set, where a stereo decoder uses both the“L+R” and “L−R” signals in a matrix that decodes and restores theoriginal L and R audio program. For purposes of transmitting a BTSCencoded signal, a third signal, called the pilot subcarrier signal 210,is inserted between the main-channel signal 202 (L+R) and the stereosignal 204 (L−R), as illustrated in FIG. 2. According to the BTSCstandard, the “pilot subcarrier shall be frequency locked to thehorizontal scanning frequency of the transmitted video signal,” and maybe used to indicate the presence of multiple sound channels or toprocess these sound channels at the receiver. The composite signal isgenerated by multiplying the encoded difference signal by a waveformthat oscillates at twice the pilot frequency according to the cosinefunction cos(4π Fpt), where t is time, to generate an amplitudemodulated, double-sideband, suppressed carrier signal and by then addingto this signal the conditioned sum signal and the pilot tone.

In the past, BTSC stereo encoders and decoders were implemented usinganalog circuits. Prior attempts to produce a sinusoidal pilot signalhave used sinusoidal input tones or otherwise analog signal trackingtechniques to have a sinusoidal pilot tone track the horizontal scanningfrequency of the transmitted video signal. However, conventional analogBTSC encoders (such as described in U.S. Pat. No. 4,539,526) have beenreplaced by digital encoders because of the many benefits of digitaltechnology. Prior attempts to implement the analog BTSC encoder 100 indigital form have failed to exactly match the performance of analogencoder 100. This difficulty arises from the fact that the BTSC standarddefines all the critical components of idealized encoder 100 in terms ofanalog filter transfer functions, and prior digital encoders have notbeen able to provide digital filters that exactly match the requirementsof the BTSC-specified analog filters. As a result, conventional digitalBTSC encoders (such as those described in U.S. Pat. Nos. 5,796,842 and6,118,879) have deviated from the theoretical ideal specified by theBTSC standard, and have attempted to compensate for this deviation bydeliberately introducing a compensating phase or magnitude error in theencoding process. To the extent that conventional digital encoders haveattempted to provide a digital tracking mechanism for the aural pilotsubcarrier, conventional digital techniques have had only limitedresolution due to sampling rate limitations, or have used complex filterstructures that contribute to circuit size and cost. In addition,conventional digital phase and tracking loop approaches have used clockrates similar in frequency to the repetition rate of the input referenceclock, and as a result have suffered from poor acquisition/trackingperformance.

In addition to the complexity of the computational requirements forencoding the stereo signals, such as described above, theever-increasing need for higher speed communications systems imposesadditional performance requirements and resulting costs for BTSCencoding systems. In order to reduce costs, communications systems areincreasingly implemented using Very Large Scale Integration (VLSI)techniques. The level of integration of communications systems isconstantly increasing to take advantage of advances in integratedcircuit manufacturing technology and the resulting cost reductions. Thismeans that communications systems of higher and higher complexity arebeing implemented in a smaller and smaller number of integratedcircuits. For reasons of cost and density of integration, the preferredtechnology is CMOS. To this end, digital signal processing (“DSP”)techniques generally allow higher levels of complexity and easierscaling to finer geometry technologies than analog techniques, as wellas superior testability and manufacturability.

There is a need to provide a digital encoding system for processingstereophonic audio signals in compliance with the BTSC standard thatprovides accurately encoded audio signals. Conventionally known systemshave used overly complex circuits to generate pilot signals withinsufficient frequency resolution. Further, the nature of existinganalog BTSC encoders has made them inconvenient to use with digitalequipment such as digital playback devices. A digital BTSC encoder couldaccept the digital audio signals directly and could therefore be moreeasily integrated with other digital equipment. Therefore, there is aneed for a better system that is capable of performing the abovefunctions and overcoming these difficulties without increasing circuitarea and operational power. Further limitations and disadvantages ofconventional systems will become apparent to one of skill in the artafter reviewing the remainder of the present application with referenceto the drawings and detailed description which follow.

SUMMARY OF THE INVENTION

In accordance with the present invention, an integrated circuit systemand method are provided for generating a pilot signal that is used inencoding and decoding stereophonic audio signals in accordance with theBTSC standard. In a selected embodiment, the reference signal that isused as an input to the pilot signal generator is a simple two-statedigital signal that is periodic with a repetition rate equal to thehorizontal scanning frequency of the transmitted video. The periodicityof the reference input signal may be indicated by transitions such asrising edges and/or falling edges. The pilot signal generator generatesa digital sinusoidal signal whose frequency tracks the horizontalscanning frequency of the video signal by matching the repetition rateof the reference pulse or edge signal.

In a selected embodiment, a digital signal encoder is provided forencoding digital signals at an encoding clock rate. The encoded signalsare transmitted over a frequency band comprising a low frequencycomponent, a pilot frequency component and a higher frequency component.The pilot frequency component is generated by a pilot frequency signalgenerator constructed of a phase detector, a digital loop filter, alocal phase generator and a sinusoid generator. Each of the componentsof the pilot frequency signal generator operates at a generator clockrate that is substantially higher than the encoding clock rate. Thephase detector, which may be implemented as an up/down counter,generates a first output signal representing a phase relationshipbetween a two-state input reference signal and a rollover signal. Thedigital loop filter processes the counter output to generate an offsetterm, and may be implemented with digital filters to generate a linearterm and an integrator term, where each filter is a cascade of twoprogrammable stages. Saturators may also be included in the loop filterto control the maximum frequency difference of the pilot frequencysignal generator output from its nominal value. The local phasegenerator generates a rollover signal that is fed back to the phasedetector. The local phase generator also generates an output phasesignal based upon the offset term. The sinusoid generator receives theoutput phase signal and generates a digital pilot frequency signal thatis frequency locked to the input reference signal. The output of thesinusoid generator may be down sampled to convert the digital pilotfrequency signal to a pilot signal having a sampling rate equal to theencoding clock rate by selecting a subset of the digital pilot frequencysignal when the encoding clock rate is an integer multiple of thesampling rate. When the encoding clock rate is not an integer factor ofthe sampling rate, a compensating term is selectively added to the localphase generator output. With the present invention, the digital signalencoder may be formed as a CMOS integrated circuit on a common substratewith a BTSC encoder circuit.

In a selected embodiment, a method and system are provided forgenerating a digital sinusoid signal whose frequency matches therepetition rate of an external reference signal. By using an internalclock having a high rate, the phase relationship between a two-statedigital reference signal and a feedback signal can be accurately trackedby a phase detector and then loop filtered to generate an offset valuewhich is added to an expected or nominal frequency of the digitalsinuosoid to generate a pilot phase signal. By applying the pilot phasesignal to a phase accumulator, a phase signal is generated which isinput to a sinusoid generator, such as a look-up table, to retrieve adigital sinusoid signal corresponding to the phase signal. The digitalsinusoid signal can be down sampled to a predetermined rate by selectinga subset of the digital sinusoid signal when the internal clock rate isan integer multiple of the predetermined rate. If the internal clockrate is not an integer multiple of the predetermined rate, digitalsinusoid signal can be down sampled by selecting a subset of the digitalsinusoid signal and adding a compensating term to the phase accumulatoroutput. For example, the digital sinusoid signal may be a BTSC pilotsubcarrier that is frequency locked to the horizontal scanning frequencyof a transmitted video signal.

The objects, advantages and other novel features of the presentinvention will be apparent from the following detailed description whenread in conjunction with the appended claims and attached drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows a block diagram of a prior art analog BTSC encoder.

FIG. 2 is a graph of the spectrum of the BTSC composite signal.

FIG. 3 depicts a system level description of a BTSC encoder inaccordance with the present invention.

FIG. 4 depicts a block diagram of a digital BTSC pilot signal generatorin accordance with the present invention.

FIG. 5 illustrates one embodiment of a BTSC encoder pilot locking loopconstructed according to the invention.

FIG. 6 is a diagram illustrating an application of the present inventionin the RFM unit of a set-top box chip.

DETAILED DESCRIPTION

An apparatus and method in accordance with the present invention providea system for producing a digital sinusoid signal that is frequencylocked to another reference signal. As will be appreciated, a digitaltracking signal generator of the present invention has many potentialapplications. For example, the digital tracking signal generator can beused with digitally encoding of stereo signals in accordance with theBTSC standard. A system level description of the operation of a BTSCencoder application of the present invention is shown in FIG. 3 whichdepicts a diagram of a digital BTSC encoder 300. The output of thisencoder 300 is a BTSC compliant signal which includes stereo and SAPfunctionality for stereo encoding, advantageously sharing anamplitude/spectral compressor circuit 340 to thereby reduce the circuitsize. It will be appreciated that the encoder of the present inventionmay also be implemented to provide the professional channel encodingspecified by the BTSC standard, or may otherwise output a baseband BTSCmultiplex signal at output 355. For example, the BTSC encoder may beincluded as part of an RF modulator core (RFM) in a television set-topbox device that converts a NTSC/PAL/SECAM compliant digital compositevideo source and a pulse code modulated (PCM) audio source into ananalog composite television signal that is suitable for demodulation bya television demodulator. In this application, the baseband BTSCcomposite signal 355 is fed to a rate converter and FM modulator thatmodulates the aural carrier, and the resulting signal is then summedwith a baseband composite video signal. The combined audio/video signalis mixed to a RF frequency, converted to analog form and sent off chip.

As indicated in FIG. 3, the BTSC encoder receives two 18-bit audiochannel inputs (L 301 and R 302). To allow proper digital processing ofthe signals, the encoder should operate at a sufficiently high rate (forexample, 10-20 times the audio bandwidth) to allow the analog anddigital filters to match in phase and amplitude. The choice of thesampling rate is driven by the need for the digital filterimplementations to more closely match the analog filter transformfunctions (specified by the BTSC standard) in both magnitude and phase.A sample rate above 200 kHz (e.g., 316 kHz) results in good matching ofthe magnitude and phase responses between the analog and digital domainsso that no phase compensation is needed in the encoding process. In aselected embodiment, two channel inputs 301, 302 which arrive at a firstsample rate (e.g., 27 MHz/32) are converted to a second sample rate(e.g., 54 MHz/171) by input variable interpolator decimator VID(Variable Rate Interpolator Decimator) structures (not shown).

In connection with the system level description of FIG. 3, whenmonophonic (MONO) audio processing is desired, the Left and Rightchannels of the input stereo audio signal 301, 302 are summed (in asummer 312) and passed to a 75 μsecond preemphasis filter 322. Thisdatapath is considered to be the SUM channel. The 75 μsecond preemphasisfilter 322 provides extra gain to the high-frequency components. Theoutput of the preemphasis filter 322 is passed directly to the summingdevice 350. The other two inputs to the final summation 350 in the BTSCencoder 300, which are the DIFF channel output 346 and the pilot tone336, are zeroed out. Note that the SUM channel is sometimes referred toas the L+R channel, and the DIFF channel is sometimes referred to as theL−R channel.

When SAP (secondary audio program) processing is desired in the encoderof FIG. 3, the monophonic SAP signal replaces the “Right” audio inputchannel. The BTSC encoder first sharply bandlimits the SAP audio inputstream to 10 kHz using a low-pass filter (not shown). The resultingsignal is passed through the DIFF channel to a fixed preemphasis filter332 whose characteristics are defined in the MTS OET-60. The output ofthis filter 332 is passed to amplitude/spectral compressor module 340.The output of amplitude/spectral compressor module 340 FM modulates thecarrier sine wave whose frequency is five times the pilot rate of 15.734kHz.

When dual monophonic (DUAL MONO) operation is desired, a monophonicaudio signal replaces the “Left” audio input channel, and the SAP signalreplaces the “Right” audio input channel. Thus, the main monophonicsignal is transmitted through the SUM channel at the same time that theSAP signal is transmitted through the DIFF channel. Note that in thiscase, the left audio input 300 and the right SAP input 302 bypass theadder 312 and subtractor 314 and pass through the multiplexers 316 and318 to the SUM channel and DIFF channel.

Stereo processing is very similar to dual monophonic processing. In theencoder of FIG. 3, an input section 310 receives the left and rightchannel audio input signals and generates therefrom a sum signal and adifference signal. A signal addition device 312 produces the SUM (L+R)channel based on the sum of the Left and Right channels of the inputstereo audio signal. A signal subtraction device 314 produces the DIFF(L−R) channel based on the difference between the Left and Rightchannels of the input stereo audio signal. It will be appreciated that amatrix functionality may be used to receive the digital left and digitalright signals and to generate the digital sum signal and digitaldifference signal. The SUM channel is passed through the 75 μsecondpreemphasis filter 322, and the DIFF channel is passed through the fixedpreemphasis filter 332 and the amplitude/spectral compressor module 340.The output of amplitude/spectral compressor 340 is passed to the DSB SC(Double Side Band Suppressed Carrier) AM (Amplitude Modulator) block344, where it amplitude modulates the sine wave carrier whose frequency(31,468 Hz) is equal to twice that of the pilot tone (15,734 Hz). Theoutput 346 of this modulator along with 324 and 336 is passed to the sumblock 350 that produces the BTSC composite signals 355. The output ofencoder 300 is a BTSC composite signal 355 that is used to FM modulatethe aural carrier.

The output 346 of this modulator along with 324 and 326 is passed to thesum block 350 that produces the BTSC composite signal 355.

FIG. 4 depicts a block diagram of a digital BTSC pilot signal generator400 in accordance with a selected embodiment of the present invention.When implemented as a digital phase (and frequency) tracking loop, thepresent invention includes a reference signal input 402, phase detector404, loop filter 406, and local phase generator 408. By constructing thecomponents of the pilot signal generator 400 with a digital circuitimplementation that uses a clock signal 420 having a fixed rate (“Fclk”)that is much higher than the repetition rate (“Fref”) of the inputreference signal 402, all of the blocks shown in FIG. 4 run at thehigher Fclk rate. For example, if the BTSC stereo encoder 300 depictedin FIG. 3 uses an internal 27 MHz clock, and the encoder 300 is encodinga stereo signal associated with an NTSC encoded video signal having ahorizontal scan rate of Fref=(4.5 MHz/286)=(27 MHz/1716)=15.734266 kHz,the reference signal input 402 has a repetition rate equal on average to15.734266 kHz. Once the loop converges, the “Rollover” signal 409 isalso expected to have a periodicity equal on average to 15.734266 kHz.

An advantage of a selected embodiment of the present invention is theimproved resolution available for tracking digital phase information byusing high clock signal rates. As will be appreciated, the ability of adigital phase locked loop (PLL) to track the phase of the incomingreference signal is determined by the chosen clock signal rate, Fclk.For example, if the time interval between samples is set at Tclk=1 ns,new inputs are sampled and processed at times 0 ns, 1 ns, 2 ns, etc. Thephase detector 404 can not distinguish between an input that changes attime 0.25 ns and an input that changes at time 0.5 ns. More generally,the phase detector 404 can not distinguish between an input that changesat time t1 and an input that changes at time t2 if(t2−t1)<(Tclk=1/Fclk). The phase detector 404 can only discriminate witha resolution in time of the clock period, Tclk. If the clock rate is toolow, the clock period can approach a significant fraction of the inputreference signal's repetition rate, resulting in diminished accuracy intracking the input reference signal frequency, which is just the changeper time in the input reference signal's phase. In accordance with thepresent invention, a 27 MHz clock rate (Fclk) for the digital phase lockloop denotes a 37 nanosecond period, which would provide a trackingperformance of up to approximately (Tclk/Tref)=(Fref/Fclk)=1/1716=583PPM (parts per million). As the clock rate is lowered, the minimumresolution value will increase, reducing its performance. So long as theinternal clock rate frequency Fclk is substantially higher than theencoder clock rate Fref, the tracking loop 400 exhibits goodperformance.

FIG. 5 illustrates a selected embodiment of a BTSC encoder pilot lockingloop device 500 constructed according to the invention. The inputreference signal 502 (“Reference”) to the phase detector 504 of thedevice is a pulse train that repeats at the horizontal scanningfrequency of the video signal. For the depicted example, the device 500is clocked with a clock signal (not shown) having a 27 MHz clock rate(Fclk). This means that the reference pulses 502 are expected to arriveon average once every 1716 clocks. The second input of the phasedetector 504 is a feedback or rollover signal 548 from the phaseaccumulator 550. The rollover signal 548 is also a pulse train. Thephase accumulator 550 produces these pulses whenever the phase in theaccumulator “wraps around” from the maximum value to the minimum value.When the loop is fully locked, the rollover and reference pulse trainswill be perfectly aligned.

In a selected embodiment, the phase detector 504 is implemented as afour bit up-down counter whose output indicates the phase relationshipbetween the two input pulse trains. In operation, the phase detector 504increments the counter when the reference pulse 502 arrives anddecrements the counter when the rollover pulse 548 arrives. If thereference and rollover signals 502, 548 arrive simultaneously, the valueof the loop detector is not changed. In steady-state locked operation,when the two pulse trains are aligned, the phase detector 504 shouldalways output a zero value, denoting that the frequencies (and phases)of the reference and rollover signals 502, 548 are the same.

The phase detector 504 also indicates when there is a phase differencebetween the two pulse trains 502, 548. For example, suppose that thereference pulse 502 occurs some number of clocks before the rolloverpulse 548. Assuming that the original output state of the loop filter iszero, the arrival of the reference pulse 502 will increment the counter504 to a value of one. Some number of clocks later, the rollover pulse548 will arrive, and the phase detector output 505 will decrement backto zero. As a result, the delay between the two pulses 502, 548 willproduce a phase detector output 505 consisting of a pulse of value onewith width equal to the time delay.

As shown in FIG. 5, the phase detector output 505 is processed by adigital loop filter, illustrated as a proportional plus integratordigital filter implementation 506, 508. The digital loop filter controlsthe dynamic behavior of the pilot locking loop signal generator device500. In the proportional plus integrator digital filter embodimentdepicted in FIG. 5, the output 531 is the sum of two additive terms: a“proportional” (or “linear”) term 513 whose value is directlyproportional to the output of the loop filter, and an “integrator” term529 whose value is the output of an integrator 528.

The scaling of the linear and integral terms 513, 529 of the loop filteris produced by multiplying the phase detector output 505 by a linearcoefficient and an integrator coefficient, respectively. In a selectedembodiment, these coefficients are implemented using a cascade of twoprogrammable stages. The first stage consists of multipliers 510, 520using a linear multiplier term kn 509 and an integrator multiplier termki 517, respectively. The second stage consists of power-of-two shifters512, 522. The power-of-two shifters 512, 522 provide coarse coefficientcontrol, while the multipliers 510, 520 allow for finer setting of thecoefficient value.

The output 551 of the phase accumulator 550 shown in FIG. 5 representsthe phase of the sinusoidal output of phase locking loop. The input 545of the phase accumulator 550 corresponds to the instantaneous frequencyof the sinusoid and is the sum of two values: the frequency control word(FCW) 539, which is a fixed value corresponding to the expected averagefrequency of the output sinusoid, and the “offset” value 533, which isthe output of the loop filter. The output 551 of the phase accumulator550 is fed to a sinusoidal generator 552. In a selected embodiment,generator 552 may be implemented as a ROM lookup table.

In accordance with the present invention, the pilot subcarrier signalgenerated by the digital PLL may be efficiently downsampled to match theunderlying encoder sampling rate without using complex filteringcircuits. As depicted in FIG. 5, the output 553 of the sinusoidalgenerator 552 is generated every Tclk=1/Fclk, where Fclk is the clockrate of the control loop (for example, 27 MHz). In a selectedapplication of the digital PLL shown in FIG. 5, the output 553 is apilot tone that is processed by a BTSC encoder at a rate (Fenc) that islower than the clock rate of the control loop, Fclk. The sampling rateof the pilot tone 553 is converted from Fclk to Fenc by a downsampler554 to generate an output pilot signal 555 that is combined with therest of the BTSC composite signal.

Digital rate conversions are often accomplished through the use ofVariable Interpolator Decimator (VID) structures that employ filterswhich minimize the undesirable aliasing effects that can accompany rateconversions. However, if the rate Fenc is an integer factor of Fclk(i.e. Fclk/N, where N is a positive integer), then the output of thesinusoidal generator 552 may be simply downsampled from the Fclk rate tothe Fenc rate without any negative effects. The ideal sinusoidal samplesthat would have been required by a phase accumulator running at the Fencrate are actually a simple subset of the sinusoidal samples that areproduced by the phase accumulator running at the Fclk rate. By use ofsuch a downsampler 554, VID structures are not required which bothreduces complexity and saves area.

There may be situations where the encoder rate is not an integer factorof Fclk (for example Fenc=Fclk/(N+0.5)). In such situations,downsampling the output 553 of the sinusoidal generator 552 can produceundesirable effects. In this case, the ideal sinusoidal samples thatwould have been required by a phase accumulator running at the Fenc rateare not a subset of the sinusoidal samples that are produced by a phaseaccumulator running at the Fclk rate. Instead of using the costly VIDstructure to solve this problem, an embodiment of the present inventionadds a compensating term to the output of the phase accumulator 550. Ina selected embodiment, the pilot locking loop device 500 detects whenthe encoder rate is not an integer factor of Fclk (e.g.,Fenc=Fclk/(N+0.5)), and adds a compensating term (e.g., PilotFreq/2) tothe phase accumulator output 551 every other Fenc clock cycle. Ofcourse, depending on the ratio of the encoder frequency and clockfrequency, the size of the compensating term and the frequency of itsinsertion will change. As shown in FIG. 5, PilotFreq 541 is generated asan input to the accumulator by the pilot locking loop 500, and theaccumulator phase 546 is fed back from the accumulator 550 to the adder544. The compensating term in effect performs sinusoidal interpolationon the pilot tone, thereby eliminating the undesirable effects. As willbe appreciated, the use of a compensating technique to implementsinusoidal interpolation may be generalized to other Fenc/Fclkrelationships.

For example, the pilot phase 551 may be used to generate the 2Fp carrierneeded for the AM DSB SC modulation of the difference channel (L−R)compressor 340 output. This is achieved by scaling the output 551 of theline locked phase accumulator 550 by a factor of two and then feeding itto the sinusoidal generator ROM table 552. The output of the table 552in this case is the 2xFp carrier depicted in FIG. 2.

In addition, the pilot locking loop device 500 of the present inventionis design limited to address corner case operations that arise withdigital phase (and frequency) tracking loops. For example, if there is alarge difference between the repetition rates of the two pulse trains atthe phase detector input 504 (such as operation coming out of chip resetor operation during reconfiguration of the chip), there could existsituations where two (or more) pulses arrive on one input 502 before theother pulse arrives at input 548. In this case, the phase detectoroutput 505 can increment (or decrement) more than once per referenceperiod. In situations where this is undesirable, the present inventionallows the range of possible maximum and minimum values of the phasedetector output to be limited or saturated. This allows thelargest-amplitude signals going to the loop filter to be limited, whichthen limits the response of the loop filter.

To control the maximum frequency difference of the sinusoidal outputfrom its nominal value (as specified by the Pilot FCW 539), twoprogrammable saturation blocks may be included in the loop filter. Thefirst saturator 526 is located at the output of the integrator loop 508accumulator adder 524, and the other saturator 532 is located at theoutput of the adder 530 that sums the linear 513 and integrator 529terms of the loop filter. These saturators limit the loop filter offsetfrom the nominal FCW and thereby prevent the loop from wandering so farfrom the nominal FCW during any corner case operation state that theloop acquisition time is negatively impacted once the corner case stateis exited.

As referenced above, the present invention has many potentialapplications. For example, the digital frequency tracking signal may beused as the pilot subcarrier input to a BTSC encoder, such as depictedin FIG. 3. The present invention may also be integrated as part of asingle chip set-top box fabricated with CMOS technology. The presentinvention may also be included in an RF modulator core (RFM 614) asdepicted in FIG. 6 for generating the RF TV composite signal that isused by a set-top box to generate channel 3/4 (or such) output signal(s)627. In this application, the baseband BTSC composite signal 617 is fedto a FM modulator 618 that modulates the aural carrier, and theresulting signal 619 is then summed with a baseband composite videosignal 621 with adder 622. The combined audio/video signal is mixed to aRF frequency 624, converted to analog form 626 and sent off chip 627. Inthe depicted embodiment, RFM 614 converts a NTSC/PAL/SECAM compliantdigital composite video source 634 and a pulse code modulated (PCM)audio source 611 a, 611 b into an analog composite television signal 627that is suitable for demodulation by a television demodulator. Moreover,the RFM 614 may stereo encode the audio source according to the BTSCstandard. When BTSC encoding is used, a digital phase lock loopembodiment of present invention (such as illustrated in FIG. 5) may beused to generate a digital sinusoid input to the BTSC encoder 616.

When the loop 500 is frozen, the rollover signal 548 becomes a freerunning sinusoid with a period of 27 MHz/1716=15.734 kHz, where the 27MHz refers to the internally generated clock (Fclk) and 15.734 kHzrefers to the horizontal scanning frequency of the transmitted signal.However, because the internally generated clocks are not in generallocked to the video line rate, the rollover signal 548 frequency can beadjusted in accordance with the present invention to account for themismatch between the actual video line rate 502 and the free runningrollover 548 period. When the loop 500 is not frozen, a counter 504 isincremented upon the detection of the video start of line pulse at theinput reference line 502. The same counter 504 is decremented upon thedetection the peak of an internally generated pilot signal 548. Thus,the counter value detects the error in the frequencies of the twosignals 502, 548 and applies standard linear plus proportional filtering506, 508 to that error 505. The loop filter output is used to adjust thepilot frequency.

In a single chip integrated circuit embodiment of the present invention,a digital BTSC encoder 616 is disclosed for encoding stereo audiosignals 611, where the encoder 616 is integrated as part of a singlechip set-top box 600 fabricated with CMOS technology. Upon integrationinto a set-top box chip 600, the present invention reduces board levelcomponents, thereby reducing costs and improving performance over priorart approaches. Thus, the present invention shows, for the first time, afully integrated digital BTSC encoder 616 that may be implemented inCMOS as part of a single chip set-top box 600.

In a selected embodiment, the present invention provides a technique forproducing a digital sinusoid that is frequency-locked to a simpletwo-state input reference signal 502 whose repetition rate is equal tothe horizontal scan rate of the video signal. This invention can beimplemented in an efficient manner using a simple phase detector, alow-complexity loop filter, a pilot frequency offset adder, a phaseaccumulator and a sinusoidal generator. By using a high-frequency systemclock (Fclk), good acquisition/tracking performance is provided. Inaddition, the present invention efficiently provides for lower-ratepost-processing of the pilot tone without a costly variable interpolatordecimator. A hardware-efficient multi-channel sound encoding subsystemcan then be connected to the output and operated at a significantlylower rate while still keeping the high-performance frequencyacquisition/tracking provided by the high rate of the tracking loop.

For example, in a BTSC encoder implementation, the frequency-trackingloop runs at 27 MHz for good frequency acquisition/tracking. The overallBTSC multi-channel sound encoder does not need this high clock ratebecause the highest frequency content within the encoder is less than120 kHz. To allow proper digital processing of the signals, the encodershould operate at a minimum sample rate of approximately at least tentimes the bandwidth of the signal being encoded, e.g., 150-200 kHz. Thechoice of the sampling rate is driven by the need for the digital filterimplementations to more closely match the analog filter transformfunctions (specified by the BTSC standard) in both magnitude and phase.A sample rate of 316 kHz results in good matching of the magnitude andphase responses between the analog and digital domains so that no phasecompensation errors need to be introduced into the encoding process. Ina selected embodiment, the encoder runs at (27 MHz/85.5)=315.789 kHz.The invention produces a high-quality sinusoid at this rate that can bedirectly used by this lower-speed encoder.

While the system and method of the present invention has been describedin connection with the preferred embodiment, it is not intended to limitthe invention to the particular form set forth, but on the contrary, isintended to cover such alternatives, modifications and equivalents asmay be included within the spirit and scope of the invention as definedby the appended claims so that those skilled in the art shouldunderstand that they can make various changes, substitutions andalterations without departing from the spirit and scope of the inventionin its broadest form.

1. In a digital signal encoder for encoding first and second digitalsignals at an encoding clock rate over a frequency band comprising apilot frequency component, a pilot frequency signal generatorcomprising: a phase detector for generating a first output signalrepresenting a phase relationship between a two-state input referencesignal and a rollover signal; a digital loop filter for processing thefirst output signal to generate an offset term; a local phase generatorfor generating the rollover signal that is fed back to the phasedetector and for generating an output phase signal based upon the offsetterm; and a sinusoid generator for receiving the output phase signal andgenerating a digital pilot frequency signal that is frequency locked tothe input reference signal; wherein the pilot frequency signal generatoroperates at a generator clock rate that is substantially higher than theencoding clock rate.
 2. The pilot frequency signal generator of claim 1,wherein the phase detector comprises an up/down counter for outputtingan indication of the phase relationship between the rollover signal andreference signal.
 3. The pilot frequency signal generator of claim 1,wherein the digital loop filter comprises a proportional plus integratordigital filter for scaling the first output signal to generate a sum ofa linear term and an integrator term.
 4. The pilot frequency signalgenerator of claim 3, wherein the proportional plus integrator digitalfilter comprises a cascade of two programmable stages.
 5. The pilotfrequency signal generator of claim 1, wherein the pilot frequencysignal generator is formed on a common substrate with a BTSC encodercircuit.
 6. The pilot frequency signal generator of claim 5, wherein thepilot frequency signal generator is fabricated according to standardCMOS processing.
 7. The pilot frequency signal generator of claim 1,further comprising a down sampler for converting the digital pilotfrequency signal to a converted signal with an equal frequency having asampling rate equal to the encoding clock rate.
 8. The pilot frequencysignal generator of claim 7, wherein a compensating term is selectivelyadded to the local phase generator output when the generator clock rateis not an integer multiple of the encoding clock rate.
 9. The pilotfrequency signal generator of claim 1, wherein the digital loop filtercomprises a first saturator for limiting the value of the offset term.10. A digital integrated circuit BTSC signal encoder for encoding audiosignals associated with a video signal, comprising: (A) matrix means forreceiving a first digital audio signal and a second digital audiosignal, comprising means for summing said first and second digital audiosignals and thereby generating a digital sum signal, and including meansfor subtracting one of said first and second digital audio signals fromthe other of said digital first and second digital audio signals andthereby generating a digital difference signal; (B) sum channelprocessing means for processing said digital sum signal; (C) differencechannel processing means for digitally processing said digitaldifference signal; and (D) a pilot generator for producing a digitalsinusoid that is frequency-locked to a two-state input reference signalwhose repetition rate is equal to a horizontal scan rate of the videosignal; wherein the sum channel processing means and the differencechannel processing means operate at a first sample rate to substantiallymatch BTSC analog filter transform functions in both magnitude andphase, and the pilot generator operates at a second sample rate that ishigher than the first sample rate.
 11. The BTSC signal encoder of claim10, wherein the pilot generator comprises a counter, a digital loopfilter, a pilot frequency offset adder, a phase accumulator forgenerating a feedback signal and a phase signal, and a sinusoidalgenerator, where the counter detects and outputs a phase relationshipbetween the input reference signal and the feedback signal, the digitalloop filter generates an offset value, the adder adjusts an expectedpilot frequency by the offset value, and the sinusoidal generatorcomprises a look-up table.
 12. The BTSC signal encoder of claim 11,wherein the counter comprises a four bit up/down counter and the digitalloop filter comprises a digital filter for scaling the counter output.13. The BTSC signal encoder of claim 11, wherein the digital loop filtercomprises a first digital filter for programmably scaling the counteroutput to generate a linear term, a second digital filter forprogrammably scaling and integrating the counter output to generate anintegrator term and an adder for summing the linear term and theintegrator term.
 14. The BTSC signal encoder of claim 10, furthercomprising a downsampler for converting the digital sinusoid from thesecond sample rate to the first sample rate.
 15. The BTSC signal encoderof claim 10, wherein the first sample rate is at least substantially tentimes the bandwidth of the first and second digital audio signals.
 16. Amethod for generating a digital sinusoid signal whose frequency matchesthe repetition rate of an external reference signal using an internalclock having a first predetermined rate, comprising: applying atwo-state digital reference signal and a feedback signal to a phasedetector, where the reference signal is periodic with a repetition rateequal to an external reference frequency; loop filtering the phasedetector output to generate an offset value; adding the offset value toan expected frequency of the digital sinuosoid to generate a pilot phasesignal; applying the pilot phase signal to a phase accumulator togenerate the feedback signal and a phase signal; and retrieving adigital sinusoid signal corresponding to the phase signal.
 17. Themethod of claim 16, further comprising downsampling the digital sinusoidsignal to a second predetermined rate by selecting a subset of thedigital sinusoid signal when the first predetermined rate is an integermultiple of the second predetermined rate.
 18. The method of claim 16,further comprising downsampling the digital sinusoid signal to a secondpredetermined rate by selecting a subset of the digital sinusoid signaland adding a compensating term to the phase accumulator output when thefirst predetermined rate is not an integer multiple of the secondpredetermined rate.
 19. The method of claim 16, further comprisingdownsampling the digital sinusoid signal to a second predetermined rate.20. The method of claim 16, wherein the digital sinusoid signal is aBTSC pilot subcarrier that is frequency locked to the horizontalscanning frequency of a transmitted video signal.